<?php
/**
 * @file $HeadURL: rorumthreadcontroller.php $
 * @author $Author: DongJC (dongjianchang@haibao.com) $
 * @date $Date: 2015-4-11 12:33:49 $
 * @brief  
 */
namespace haibao\cms\business\control\pc\index;

use \haibao\cms\data\control\PublicController;

class ForumThreadController extends \haibao\cms\business\control\pc\channel\ChannelController{
	
	public function __construct($updateTime = null, $controlId, $isPublish){
		parent::__construct($updateTime, $controlId, $isPublish);
	}
	
	public function displayTemplateHtml(){
		$controlData = $this->getParameter(self::$CONTROL_DATA);
		$content = $this->getParameter(self::$CONTROL_CONTENT);
		$path = $this->generateHtmlPath(__CLASS__);
		$data = array();
		if($controlData['manual']){	
			$data = $this->getThreadData($controlData['manual']);		
		}
		$this->assign('data', $data);
		$this->assign('SiteType', \haibao\www\model\data\Favorite::ID_TYPE_THREAD_NUM);
		$this->generateHtml($path,$content);
		$content = $this->getHtml($path);
		$content = $this->replaceCDNLink($content);
		
		return $content;
	}
	
	public function getThreadData($param){
		$publicController = new PublicController();
		return $publicController->getThreadData($param);
	}
	
}